package com.example.demo8.broadcastreceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

/**
 * 自定义标准广播接收器
 */
public class MyReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context,"自定义标准广播已收到",Toast.LENGTH_SHORT).show();
        String TAG="消息";
        Log.d(TAG, "onReceive: "+intent.getStringExtra("1024"));
    }
}
